package com.servlet_demo;

import service.ActorService;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/test")
public class Test extends HttpServlet {

    private ActorService actorService = new ActorService();

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String name = request.getParameter("name");
        String sex = request.getParameter("sex");
        String phone = request.getParameter("phone");
        System.out.println(name);
        System.out.println(sex);
        System.out.println(phone);

//        actorService.getList();
//        boolean add = actorService.add(name, sex, phone);
//        if (add) {
//            System.out.println("添加成功");
//        } else {
//            System.out.println("添加失败");
//        }
    }


}
